﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XNADash.Textures;
using XNADash.Sound;

namespace XNADash.BoardBlocks
{
    public class ExitBlock : BaseBlock
    {
        bool _opened = false;

        protected override GameTexture BlockTexture
        {
            get
            {
                return _opened ? GameTexture.ExitOpen : GameTexture.Exit;
            }
        }

        public void Open()
        {
            if ( !this._opened )
            {
                this._opened = true;
                this._canBeConsumed = true;

                SoundFactory.Instance.RegisterEffect( SoundType.ExitOpen );
            }
        }

        public override string ToString()
        {
            return "!";
        }
    }
}
